package entity.CRM;

import entity.Employee;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;

@Entity
public class SaleLead implements Serializable {
    public enum CustomerType {WholeSale, DirectSale}
    @Id    
    private String registrationNumber;
    private String saleLeadName;
    private String saleLeadAddress;
    private CustomerType customerType;
    private boolean isActive;
    
    @OneToMany
    private List<Representative> representatives = new ArrayList<Representative>();
    
    @ManyToOne(cascade= CascadeType.ALL)
    private Employee customerExecutive;
    @OneToMany
    private List<SaleInquiry> saleInquiries = new ArrayList<SaleInquiry>();
    
    @OneToMany
    private List<SaleQuotation> saleQuotations = new ArrayList<SaleQuotation>();

    public CustomerType getCustomerType() {
        return customerType;
    }

    public void setCustomerType(CustomerType customerType) {
        this.customerType = customerType;
    }

    public String getRegistrationNumber() {
        return registrationNumber;
    }

    public void setRegistrationNumber(String registrationNumber) {
        this.registrationNumber = registrationNumber;
    }

    public List<Representative> getRepresentatives() {
        return representatives;
    }

    public void setRepresentatives(List<Representative> representatives) {
        this.representatives = representatives;
    }

    public List<SaleInquiry> getSaleInquiries() {
        return saleInquiries;
    }

    public void setSaleInquiries(List<SaleInquiry> saleInquiries) {
        this.saleInquiries = saleInquiries;
    }

    public String getSaleLeadAddress() {
        return saleLeadAddress;
    }

    public void setSaleLeadAddress(String saleLeadAddress) {
        this.saleLeadAddress = saleLeadAddress;
    }

    public String getSaleLeadName() {
        return saleLeadName;
    }

    public void setSaleLeadName(String saleLeadName) {
        this.saleLeadName = saleLeadName;
    }

    public List<SaleQuotation> getSaleQuotations() {
        return saleQuotations;
    }

    public void setSaleQuotations(List<SaleQuotation> saleQuotations) {
        this.saleQuotations = saleQuotations;
    }

    public boolean isIsActive() {
        return isActive;
    }

    public void setIsActive(boolean isActive) {
        this.isActive = isActive;
    }

    public Employee getCustomerExecutive() {
        return customerExecutive;
    }

    public void setCustomerExecutive(Employee customerExecutive) {
        this.customerExecutive = customerExecutive;
    }

}


